import 'package:flutter/material.dart';

var lightColorScheme = ColorScheme.fromSeed(
  seedColor: const Color(0xffE9E9E9),
  brightness: Brightness.light,
  primary: const Color(0xFF333333), // TextButton child颜色 ElevatedButton 背景颜色
  onPrimary: Colors.white, // ElevatedButton child颜色
  primaryContainer: const Color(0xffE9E9E9),
  onPrimaryContainer: const Color(0xff262626),
  secondary: const Color(0xFF333333), // MaterialButton child颜色
  onSecondary: Colors.white,
  secondaryContainer: const Color(0xffaff0b5),
  onSecondaryContainer: const Color(0xff006622),
  tertiary: const Color(0xffff7d00),
  onTertiary: Colors.white,
  tertiaryContainer: const Color(0xffffe4ba),
  onTertiaryContainer: const Color(0xff792e00),
  error: const Color(0xfff53f3f),
  onError: Colors.white,
  errorContainer: const Color(0xfffdcdc5),
  onErrorContainer: const Color(0xff770813),
  outline: const Color(0xffc9cdd4),
  background: Colors.white,
  onBackground: const Color(0xFFF5F5F5),
  surface: Colors.white,
  onSurface: const Color(0xff262626),
  shadow: Colors.black,
  scrim: const Color(0xff1d2129).withOpacity(0.6),
);

var darkColorScheme = ColorScheme.fromSeed(
  seedColor: const Color(0xffE9E9E9),
  brightness: Brightness.dark,
  primary: const Color(0xffFAFAFA), // TextButton child颜色 ElevatedButton 背景颜色
  onPrimary: const Color(0xfff6f6f6), // ElevatedButton child颜色
  primaryContainer: const Color(0xff606060),
  onPrimaryContainer: const Color(0xffFAFAFA),
  secondary: const Color(0xFF333333), // MaterialButton child颜色
  onSecondary: const Color(0xfff6f6f6),
  secondaryContainer: const Color(0xff046625),
  onSecondaryContainer: const Color(0xffb2f0b7),
  tertiary: const Color(0xffff9626),
  onTertiary: const Color(0xfff6f6f6),
  tertiaryContainer: const Color(0xff793004),
  onTertiaryContainer: const Color(0xffffe3b8),
  error: Colors.redAccent,
  onError: Colors.red,
  errorContainer: const Color(0xff770611),
  onErrorContainer: const Color(0xfffdd1ca),
  outline: Colors.white.withOpacity(0.3),
  background: const Color(0xFF111111),
  onBackground: const Color(0xFF191919),
  surface: const Color(0xFF2E2E2E),
  onSurface: const Color(0xFFFFFFFF),
  shadow: Colors.black.withOpacity(0.9),
  scrim: const Color(0xff17171a).withOpacity(0.6),
);

var lightTheme = ThemeData(
  useMaterial3: true,
  focusColor: const Color(0xFF333333),
  primaryColor: Colors.lightGreen,
  dividerTheme: const DividerThemeData(color: Color(0xFFE5E5E5), thickness: 0),
  scaffoldBackgroundColor: Colors.white,
  appBarTheme: const AppBarTheme(
    titleTextStyle: TextStyle(color: Color(0xFF333333), fontSize: 18),
    backgroundColor: Colors.white,
    centerTitle: true,
    titleSpacing: 0,
    elevation: 0,
  ),
  cardTheme: const CardTheme(color: Colors.white, elevation: 0),
  textTheme: const TextTheme(
    // titleMedium: TextStyle(fontStyle: FontStyle.italic), // TextFiled 默认文字样式
    titleLarge: TextStyle(color: Color(0xFF333333), fontSize: 18), // AppBar默认文字样式
    bodyMedium: TextStyle(color: Color(0xFF333333), fontSize: 16), // Text默认文字样式
    labelLarge: TextStyle(fontSize: 16), // Button child Text默认文字样式
  ),
  colorScheme: const ColorScheme(
    brightness: Brightness.light,
    primary: Color(0xFF333333), // TextButton child颜色 ElevatedButton 背景颜色
    onPrimary: Colors.lightGreen, // ElevatedButton child颜色
    secondary: Color(0xFF333333), // MaterialButton child颜色
    onSecondary: Colors.white,
    error: Colors.redAccent,
    onError: Colors.red,
    background: Colors.white,
    onBackground: Color(0xFFF5F5F5),
    surface: Colors.white,
    onSurface: Color(0xFF333333),
  ),
);

var darkTheme = ThemeData(
  useMaterial3: true,
  focusColor: Colors.white,
  primaryColor: Colors.lightGreen,
  dividerTheme: const DividerThemeData(color: Color(0xFF252525), thickness: 0),
  scaffoldBackgroundColor: const Color(0xFF111111),
  appBarTheme: const AppBarTheme(
    titleTextStyle: TextStyle(color: Colors.white, fontSize: 18),
    backgroundColor: Color(0xFF111111),
    centerTitle: true,
    titleSpacing: 0,
    elevation: 0,
  ),
  cardTheme: const CardTheme(color: Color(0xFF111111), elevation: 0),
  textTheme: const TextTheme(
    // titleMedium: TextStyle(color: Colors.white, fontSize: 16), // TextFiled 默认文字样式
    titleLarge: TextStyle(color: Colors.white, fontSize: 18), // AppBar默认文字样式
    bodyMedium: TextStyle(color: Colors.white, fontSize: 16), // Text默认文字样式
    labelLarge: TextStyle(fontSize: 16), // Button child Text默认文字样式
  ),
  colorScheme: const ColorScheme(
    brightness: Brightness.dark,
    primary: Colors.white, // TextButton child颜色 ElevatedButton 背景颜色
    onPrimary: Colors.lightGreen, // ElevatedButton child颜色
    secondary: Colors.white, // MaterialButton child颜色
    onSecondary: Color(0xFF191919),
    error: Colors.redAccent,
    onError: Colors.red,
    background: Color(0xFF111111),
    onBackground: Color(0xFF191919),
    surface: Color(0xFF2E2E2E),
    onSurface: Color(0xFFFFFFFF),
  ),
);
